<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="王佳佳">
    <title></title>
    <style>
        *
        {
            box-sizing: border-box;
        }
        body
        {
            margin: 0;
        }
        main
        {
            border: 5px solid; 
            width: 500px;
            height: 620px;
            margin: 50px auto;
        }
        .box
        {
            /* border: 1px solid;   */
            width: 460px;
            height: 580px;
            margin: 20px;
        }
        .box-top
        {
            /* border: 1px solid; */
            width: 460px;
            height: 340px;
            display: flex;
            justify-content: space-between;
        }
        .top-left
        {
            /* border: 1px solid; */
            width: 340px;
            height: 340px;
        }
        .top-left img
        {
            width: 340px;
            height: 340px;
        }
        .top-right
        {
            /* border: 1px solid; */
            width: 100px;
            height: 340px;
            display: flex;
            flex-direction:column;
            justify-content: space-between;
        }
        .top-right img
        {
            width: 100px;
            height: 100px;
            cursor: pointer;
        }


        .box-bottom
        {
            width: 460px;
            height: 220px;
            margin-top: 20px;
        }
        .box-bottom section
        {
            /* border: 1px solid; */
            width: 460px;
            height: 100px;
            display: flex;
            justify-content: space-between;
        }
        .box-bottom section:nth-child(1)
        {
            margin-bottom: 15px;
        }
        .box-bottom img
        {
            /* border: 1px solid; */
            width: 100px;
            height: 100px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <main>
        <section class="box">
            <section class="box-top">
                <section class="top-left">
                    <img src="img/big_2.jpg" alt="">
                </section>
                <section class="top-right">
                    <img class="smallimg" src="img/small_1.jpg" alt="">
                    <img class="smallimg" src="img/small_2.jpg" alt="">
                    <img class="smallimg" src="img/small_3.jpg" alt="">
                </section>
            </section>

            <section class="box-bottom">
                <section>
                    <img class="smallimg" src="img/small_4.jpg" alt="">
                    <img class="smallimg" src="img/small_5.jpg" alt="">
                    <img class="smallimg" src="img/small_6.jpg" alt="">
                    <img class="smallimg" src="img/small_7.jpg" alt="">
                </section>
                <section>
                    <img class="smallimg" src="img/small_8.jpg" alt="">
                    <img class="smallimg" src="img/small_9.jpg" alt="">
                    <img class="smallimg" src="img/small_10.jpg" alt="">
                    <img class="smallimg" src="img/small_11.jpg" alt="">
                </section>
            </section>
        </section>
    </main>
</body>
</html>

<script>
    window.onload = function()
    {
        var buttons = document.querySelectorAll('.smallimg');
        var img = document.querySelector('.top-left img');
        var urls = ['img/big_1.jpg','img/big_2.jpg','img/big_3.jpg','img/big_4.jpg','img/big_5.jpg','img/big_6.jpg',
                    'img/big_7.jpg','img/big_8.jpg','img/big_9.jpg','img/big_10.jpg','img/big_11.jpg'];
        var index = 0;
        for(var i = 0; i < buttons.length; i++)
        {
            buttons[i].index = i;
            buttons[i].onmouseover = function()
            {
                for(var i = 0; i < buttons.length; i++)
                {
                    img.style.url = '';
                }
                console.log(index);
                img.src = urls[this.index];
            }
        }
    }
</script>